#!/usr/bin/env python
PACKAGE = "hikrobot_camera"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

gen.add("FrameRate",        int_t,      0,  "Frame rate",       60,     10,     60)
gen.add("ExposureTime",     int_t,      0,  "Exposure time",    2000,   0,      1000000)
gen.add("GammaEnable",      bool_t,     0,  "Enable Gamma",     True)
gen.add("Gamma",            double_t,   0,  "Gamma",            0.7,    -2.,    2.)
gen.add("GainAuto",         double_t,   0,  "Auto gain",        2.,     0,      2.)
gen.add("Saturation",       int_t,      0,  "Saturation",       128,    0,      255)
gen.add("CalibrateEnable",  bool_t,     0,  "Enable calibrate", False)
gen.add("Brightness",       int_t,      0,  "Brightness",       50,     0,      255)

ExposureAuto_enum = gen.enum([gen.const("Off",          int_t,  0,  "Disable exposure auto"),
                              gen.const("Once",         int_t,  1,  "Exposure time auto adjust once"),
                              gen.const("Continous",    int_t,  2,  "Exposure time continously auto adjusts")], "ExposureAuto")
gen.add("ExposureAuto",     int_t,      0,  "Auto exposure time",     0,      0,      2,      edit_method=ExposureAuto_enum)

# BalanceWhiteAuto_enum = gen.enum([gen.const("Off",          int_t,  0,  "Disable auto balance white"),
#                                   gen.const("Continous",    int_t,  1,  "Continously auto adjust balance white"),
#                                   gen.const("Once",         int_t,  2,  "Balance white auto adjust once")], "BalanceWhiteAuot")
gen.add("BalanceWhiteAuto", int_t,      0,  "Auto exposure time",     2,      0,      2,      edit_method=ExposureAuto_enum)

exit(gen.generate(PACKAGE,  "hikrobot_camera",  "camera"))